1. Field of the Invention
This invention pertains generally to computer systems. More particularly this invention is directed to an improved system and method- for providing writable pseudo-devices while running the bootstrapping code during system initialization, and similar uses.
2. The Prior Art
The bootstrapping, or boot up, process of any computer system is well known in general. From a top level architectural view, the steps and devices used are the same if the computer system is a general purpose PC-like machine or an embedded system.
Someplace on the system there must reside a small program in a non-volatile memory device that is accessible by the processor, after the processor does its own power-up self test. As part of its own initialization, the processor will load a specified address into the program counter. The processor then attempts to get the value from the address that the program counter is pointing to. This is the first instruction in what is usually a very compact program that starts configuring the system as a whole, the bootstrap program.
After the system configuration gets to a certain point, the bootstrap or boot program turns control of the system over to the kernel of the operating system, which continues to bring the system up. In all cases the bootstrap or boot program must have another area of non-volatile memory from which to read system initialization (configuration) data so that the processor can establish communications with devices in the system. The result of this is that a fair amount of relatively expensive non-volatile memory must be dedicated to the boot code and the bootstrapping process.
While the system is booting, however, it also needs read/write memory as well read-only memory. Thus, systems end up using several memory types in a single implementation, which may include:
ROMxe2x80x94for storing the bootstrap program;
EEPROMxe2x80x94for storing system initialization and configuration information needed during the booting process;
Other Non-volatile R/W memoryxe2x80x94for storage of larger programs such as an operating system or an operating system kernel; and,
DRAMxe2x80x94volatile memory for general use.
This combination of different memory types places a design cost and uses considerable real estate on system boards. Because of this, there has been a long felt need to reduce the complexity of the system as it relates to boot strapping support; in particular anything that can reduce the amount and number of memories would be a significant improvement.
The present invention discloses a method and apparatus that reduces the types of memory devices needed from four or more to only two. The two memory devices kept are the traditional DRAM plus one non-volatile read/write memory device. In one preferred embodiment the non-volatile read/write memory device is a flash memory.
The single non-volatile read/write memory device holds the bootstrap code. the system initialization and configuration data, and the operating system or operating system kernel. When the CPU is executing bootstrap code, operating system code, or reading configuration or initialization data and a write instruction is encountered, the system does not immediately start to execute the write. Instead, the portion of the executing code that is responsible for the write operation is relocated to another device available to the CPU, then the CPU PC is set to start executing instructions from the new location. The non-volatile read/write memory is put into write-only mode, the write is made, and the non-volatile memory is then switched back into read-only mode. The executing instructions now do a jump back to the instruction just after the write, and execution continues from the non-volatile read/write memory device.